<?php

namespace App\Store\Validate\Sysset;

use App\Common\Validate\BaseValidate;

/**
 * 验证器
 */
class SigninUsemoney extends BaseValidate
{
    //验证规则
    protected $rule = [];
    //自定义验证信息
    protected $message = [];

    public function __construct($doaction = 'add')
    {
        if ($doaction == 'add') {
            $this->rule = [
                'use_money_min' => 'required',
                'use_money_max' => 'required',
                'rate' => 'required|between:1,100',
            ];
            $this->message = [
                'use_money_min.required' => '使用金额min未填写',
                'use_money_max.required' => '使用金额max未填写',
                'rate.required' => '金额比例未填写',
                'rate.between' => '金额比例超出范围',
            ];
        }
    }
}

